<?php
return array(

    //Bat buoc phai co khong thi se co loi
    'controllers' => array(
        'invokables' => array(
            'Album\Controller\Album' => 'Album\Controller\AlbumController',
            'Album\Controller\Upload' => 'Album\Controller\UploadController',
        ),
    ),

   'router' => array(
        'routes' => array(

            'album' => array(
                'type'    => 'Literal',
                'options' => array(
                    'route'    => '/album',
                    'defaults' => array(
                        '__NAMESPACE__' => 'Album\Controller',
                        'controller'    => 'Album',
                        'action'        => 'index',
                    ),//defaults
                ),//options
                'may_terminate' => true,
                'child_routes' => array(
                    'default' => array(
                        'type'    => 'Segment',
                        'options' => array(
                            'route'    => '/album[/:action][/:id]',
                            'constraints' => array(
                                'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                                'id'     => '[0-9]+',
                            ),//constraints
                            'defaults' => array(
                            ),//defaults
                        ),//options
                    ),//default

                    'upload' => array(
                            'type'    => 'Segment',
                            'options' => array(
                                    'route'    => '/[:controller[/:action]]',
                                    'constraints' => array(
                                            'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
                                            'action'     => '[a-zA-Z][a-zA-Z0-9_-]*',
                                    ),//constraints
                                    'defaults' => array(
                                    ),//defaults
                            ),//options
                    ),//upload

                ),//child_routes
            ),//users

        ),//routes
    ),//router

     'view_manager' => array(

        'template_path_stack' => array(
            'album' => __DIR__ . '/../view',
        ),
    ),
);